import datetime

from extensions import db


class Data(db.Model):
    __tablename__ = 'data'

    id = db.Column(db.Integer, autoincrement=True, primary_key=True)

    title = db.Column(db.String(255))
    doi = db.Column(db.String(255))
    simle = db.Column(db.String(512))
    radiance = db.Column(db.Integer)

    user_id = db.Column(db.Integer)

    status = db.Column(db.Integer, default=1)
    create_time = db.Column(db.DateTime, default=datetime.datetime.now)
    update_time = db.Column(db.DateTime, default=datetime.datetime.now, onupdate=datetime.datetime.now)
